{extend name="base"}
{block name="title"}用户管理-查看{/block}
{block name="main"}
{volist name="users" id="vo"}
<div class="x-body">
    <blockquote class="layui-elem-quote">
        <img src="__ROOT__/static/admin/img/y.jpg" class="layui-circle" style="width:50px;float:left">
        <dl style="margin-left:80px; color:#019688">
            <dt><span>{$vo.login_name}</span></dt>
            <dd style="margin-left:0">显示内容</dd>
        </dl>
    </blockquote>
    <div class="pd-20">
        <table class="layui-table" lay-skin="line">
            <tbody>
            <tr>
                <th width="80">性别：</th>
                <td>{if condition='$vo.sex eq 0'}男{else/}女{/if}</td>
            </tr>
            <tr>
                <th>注册时间：</th>
                <td>{$vo['last_time']|date="Y-m-d H:i:s",###}</td>
            </tr>
            <tr>
                <th>其他</th>
                <td>无</td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
{/volist}
{/block}
{block name="script"}
<script>
    layui.use(['form','layer'], function(){
        $ = layui.jquery;
        var form = layui.form()
            ,layer = layui.layer;

        //自定义验证规则
        form.verify({
            nikename: function(value){
                if(value.length < 5){
                    return '昵称至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,repass: function(value){
                if($('#L_pass').val()!=$('#L_repass').val()){
                    return '两次密码不一致';
                }
            }
        });

        console.log(parent);
        //监听提交
        form.on('submit(add)', function(data){
            console.log(data);
            //发异步，把数据提交给php
            layer.alert("增加成功", {icon: 6},function () {
                // 获得frame索引
                var index = parent.layer.getFrameIndex(window.name);
                //关闭当前frame
                parent.layer.close(index);
            });
            return false;
        });


    });
</script>
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
{/block}